package com.mpyy.service.inventory;

import com.mpyy.dao.inventory.InventoryDescMapperDaoInter;
import com.mpyy.pojo.InventoryChange;
import com.mpyy.pojo.InventoryDesc;
import com.mpyy.pojo.InventoryReceipts;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @version 1.0
 * @Description com.mpyy.service.inventory.InventoryDescServiceImpl
 * @Author JW
 * @Date 2022-02-23 16:29
 */
@Service(value = "inventoryDescServiceImpl")
public class InventoryDescServiceImpl implements InventoryDescServiceInter {
    //依赖持久层
    @Autowired
    @Qualifier(value = "inventoryDescMapperDao")
    private InventoryDescMapperDaoInter inventoryDescMapperDaoInter;

    /**
     * 获取库存商品明细数据
     * @param inventoryDesc
     * @return
     */
    @Override
    public List<InventoryDesc> showAllInventoryDesc(InventoryDesc inventoryDesc) {
        List<InventoryDesc> inventoryDescObjs = inventoryDescMapperDaoInter.showAllInventoryDesc(inventoryDesc);
        return inventoryDescObjs;
    }

    /**
     * 获取库存商品汇总数据
     * @param inventoryDesc
     * @return
     */
    @Override
    public List<InventoryDesc> showAllInventoryCollect(InventoryDesc inventoryDesc) {
        List<InventoryDesc> inventoryCollectObjs = inventoryDescMapperDaoInter.showAllInventoryCollect(inventoryDesc);
        return inventoryCollectObjs;
    }

    /**
     * 获取商品批次信息
     * @param inventoryDesc
     * @return
     */
    @Override
    public List<InventoryDesc> getProBatchNumInfo(InventoryDesc inventoryDesc) {
        return inventoryDescMapperDaoInter.getProBatchNumInfo(inventoryDesc);
    }

    /**
     * 根据仓库分组查询仓库库存明细
     * @param inventoryDesc 库存明细对象
     * @return 库存明细对象集合
     */
    @Override
    public List<InventoryDesc> searchInventoryDepotDesc(InventoryDesc inventoryDesc) {
        return inventoryDescMapperDaoInter.searchInventoryDepotDesc(inventoryDesc);
    }

    /**
     * 查询库存变动信息
     * @param inventoryDesc 库存明细对象
     * @return 库存变动信息集合
     */
    @Override
    public List<InventoryChange> searchInventoryChange(InventoryDesc inventoryDesc) {
        return inventoryDescMapperDaoInter.searchInventoryChange(inventoryDesc);
    }

    /**
     * 查询商品月变动汇总信息
     * @param inventoryDesc 库存明细对象
     * @return 商品变动明细集合
     */
    @Override
    public List<InventoryChange> searchWareMonthChange(InventoryDesc inventoryDesc) {
        return inventoryDescMapperDaoInter.searchWareMonthChange(inventoryDesc);
    }

    /**
     * 查询商品月变动明细信息
     * @param inventoryDesc 库存明细对象
     * @return 商品变动明细集合
     */
    @Override
    public List<InventoryChange> searchWareMonthChangeDesc(InventoryDesc inventoryDesc) {
        return inventoryDescMapperDaoInter.searchWareMonthChangeDesc(inventoryDesc);
    }

    /**
     * 查询库存单据详情
     * @param inventoryDesc 库存明细对象
     * @return 库存单据详情集合
     */
    @Override
    public List<InventoryReceipts> searchInventoryReceiptsDesc(InventoryDesc inventoryDesc) {
        return inventoryDescMapperDaoInter.searchInventoryReceiptsDesc(inventoryDesc);
    }

    /**
     * 获取最早的入库日期
     * @return 日期
     */
    @Override
    public Date searchEarliestDate() {
        return inventoryDescMapperDaoInter.searchEarliestDate();
    }
}
